3.138 \(\int (a+b \tanh ^{-1}(\frac{c}{x})) \, dx\)

Optimal. Leaf size=29 \[ a x+\frac{1}{2} b c \log \left (c^2-x^2\right )+b x \tanh ^{-1}\left (\frac{c}{x}\right ) \]

[Out]

a*x + b*x*ArcTanh[c/x] + (b*c*Log[c^2 - x^2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0133345, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {6091, 263, 260} \[ a x+\frac{1}{2} b c \log \left (c^2-x^2\right )+b x \tanh ^{-1}\left (\frac{c}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTanh[c/x],x]

[Out]

a*x + b*x*ArcTanh[c/x] + (b*c*Log[c^2 - x^2])/2

Rule 6091

Int[ArcTanh[(c_.)*(x_)^(n_)], x_Symbol] :> Simp[x*ArcTanh[c*x^n], x] - Dist[c*n, Int[x^n/(1 - c^2*x^(2*n)), x]
, x] /; FreeQ[{c, n}, x]

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \left (a+b \tanh ^{-1}\left (\frac{c}{x}\right )\right ) \, dx &=a x+b \int \tanh ^{-1}\left (\frac{c}{x}\right ) \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac{c}{x}\right )+(b c) \int \frac{1}{\left (1-\frac{c^2}{x^2}\right ) x} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac{c}{x}\right )+(b c) \int \frac{x}{-c^2+x^2} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac{c}{x}\right )+\frac{1}{2} b c \log \left (c^2-x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0028142, size = 29, normalized size = 1. \[ a x+\frac{1}{2} b c \log \left (c^2-x^2\right )+b x \tanh ^{-1}\left (\frac{c}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTanh[c/x],x]

[Out]

a*x + b*x*ArcTanh[c/x] + (b*c*Log[c^2 - x^2])/2

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 48, normalized size = 1.7 \begin{align*} ax+bx{\it Artanh} \left ({\frac{c}{x}} \right ) +{\frac{bc}{2}\ln \left ({\frac{c}{x}}-1 \right ) }-bc\ln \left ({\frac{c}{x}} \right ) +{\frac{bc}{2}\ln \left ( 1+{\frac{c}{x}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctanh(c/x),x)

[Out]

a*x+b*x*arctanh(c/x)+1/2*b*c*ln(c/x-1)-b*c*ln(c/x)+1/2*b*c*ln(1+c/x)

________________________________________________________________________________________

Maxima [A]  time = 0.949895, size = 39, normalized size = 1.34 \begin{align*} \frac{1}{2} \,{\left (2 \, x \operatorname{artanh}\left (\frac{c}{x}\right ) + c \log \left (-c^{2} + x^{2}\right )\right )} b + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x),x, algorithm="maxima")

[Out]

1/2*(2*x*arctanh(c/x) + c*log(-c^2 + x^2))*b + a*x

________________________________________________________________________________________

Fricas [A]  time = 1.67863, size = 85, normalized size = 2.93 \begin{align*} \frac{1}{2} \, b c \log \left (-c^{2} + x^{2}\right ) + \frac{1}{2} \, b x \log \left (-\frac{c + x}{c - x}\right ) + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x),x, algorithm="fricas")

[Out]

1/2*b*c*log(-c^2 + x^2) + 1/2*b*x*log(-(c + x)/(c - x)) + a*x

________________________________________________________________________________________

Sympy [A]  time = 0.317447, size = 24, normalized size = 0.83 \begin{align*} a x + b \left (c \log{\left (c - x \right )} + c \operatorname{atanh}{\left (\frac{c}{x} \right )} + x \operatorname{atanh}{\left (\frac{c}{x} \right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atanh(c/x),x)

[Out]

a*x + b*(c*log(c - x) + c*atanh(c/x) + x*atanh(c/x))

________________________________________________________________________________________

Giac [A]  time = 1.13099, size = 57, normalized size = 1.97 \begin{align*} \frac{1}{2} \,{\left (x \log \left (-\frac{\frac{c}{x} + 1}{\frac{c}{x} - 1}\right ) + c \log \left ({\left | -c^{2} + x^{2} \right |}\right )\right )} b + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x),x, algorithm="giac")

[Out]

1/2*(x*log(-(c/x + 1)/(c/x - 1)) + c*log(abs(-c^2 + x^2)))*b + a*x